Adding more validation checks and default value checks.