copy null to null as well instead of getting nullpointer