Added validate method to BaseObject. Need to add it to all subclasses.

User class is not a subclass of BaseObject. Needs to be fixed.