Add Validations to Task Model

Added some basic validations in task model for task creation and updating.