Add validation and db constraints

Updated validates and null constraints in database for Student and
Teacher models.