Use ternary statements for validation