check for null pointer from selectInventItem