Revert back to $data if no relation_id is set

This should fix #70 while keeping the is_array check