Handles null entity