Fixes NPE when ObjectTypeId and Id are entered manually