add check for post_type request in admin. clears a php warning.