Return null when getting entity if no entities