Checks and Validations - PHP snippets