code: def get_valid_location(location):
      
      # If we're given None, return None
      if location is not None and cellular_components.get(location) is None:
          loc = cellular_components_reverse.get(location)
          if loc is None:
              raise InvalidLocationError(location)
          else:
              return loc
      return location
docs: Check if the given location represents a valid cellular component.