minor adjustments to reflection query to improve debugging and account for null reflected type
#4