Refactor availability validator to use a guard clause