@classmethod
def get_by_id(cls, record_id):
    """Get record by ID."""
    if any((isinstance(record_id, (str, bytes)) and record_id.isdigit(),
        isinstance(record_id, (int, float)))):
        return cls.query.get(int(record_id))
    return None
