Added some simple validation