You can just write the object and if it's null nothing it won't show anything