checking if inner object is set when creating