Check if graphicObjet is nullptr before apply transformations