The fix is this: while you are updating the component, make sure that you are not passing null in the coordinates' latitude or longitude.
I faced the same error while looping through an object, where some of my fields were empty. I solved it by defaulting to 0 whenever there was an empty value.