Compacted isFocused method.