prevent selecting null object