Use guard clause instead of multiple patterns