Fixes error online on pr create trying to get roperty of non=object