hook: Fix indentation on hasattr conditional.