Added isValid method to hand class