Fix crash with null fields during reflection.