Make "elif" check more specific