Fix the check for parent object id