Implemented typechecking of field lookup for generic types.