Revert back to $data if no relation_id is set

This should fix #70 while keeping the is_array check
Merge pull request #72 from DeuxHuitHuit/issue-70

Revert back to $data if no relation_id is set