def METHOD_NAME(oid):
    if isinstance(oid, ObjectId):
        return oid
    return None
    # TODO: properly implement parsing oid string
    oid_parts = ObjectId.parse_oid_string(oid)
    if not oid_parts:
        return None
    type = oid_parts["type"]
    ids = oid_parts["id"]
    prefix = oid_parts["prefix"]
    if not ObjectFactory.get_instance("persistence_facade").is_known_type(type):
        return None
    num_pks = ObjectId.get_number_of_pks(type)
    if num_pks == None or num_pks != len(ids):
        return None
    return ObjectId(type, ids, prefix)