I've created a block view for node pages that displays other nodes that are nearby (based on location proximity).

contextual filter-> gloabal:null -> Provide default value -> content ID from URL
Filter -> Location: Distance / Proximity
filter -> location: LID not EMPTY

It's working properly but if the node page doesn't have location field I get the following error in log messages:
Notice: Undefined index: longitude in location_views_proximity_get_reference_location() (linea 550 ..sites/all/modules/location/location.views.inc).

I suppose i must add another contextual filter that check if the page has not empty location field or custom PHP validation.
How can I solve it?