Fix potential NRE and give better output for fields and some types