Cast parent_id to_i for check