Added test cases for field accessor. Fixed null pointer emission of field accessor.