def _to_loc(ll):
 if (isinstance(ll, (int, float)) or (len(ll) > 0)):
  return ll
 else:
  return 0.0

def _to_loc ( ll ) : if ( isinstance ( ll , ( int , float ) ) or ( len ( ll ) > 0 ) ) : return ll else : return 0.0
check if location exists .