Added some validations.