Added Try catch and a thrown error.
Played around testing different thing. Look pretty good at the moment I think.
Continued to play around. redoing the error handling.
More testing.
Added check to see if argument is an array.
Updated error texts
Added a check that makes sure that a person contains a key named name.