Added some simple validation.