Use correct variable for parent ID
Check that parent ID is valid
Merge pull request #231 from WP-API/check-post-parent

Check post parent correctly on insertion.  Closes #228.