fix issue with null objects