Fixes bug in map view code

Lat/long coordinates that were null, but still in an array were getting
through the map view script and causing an error. This creates a more
thorough check for the existence of lat/long values.