def METHOD_NAME(model, object_id, identifier_attr='pk'):
    """Get object if it exists, else raise 404"""
    try:
        return get_object_or_404(model, **{identifier_attr: object_id})
    except Http404:
        pass