Fix bug when calling methods with null arguments on derived types.