Fix possible NULL pointer dereference
Add second try of is_enabled() operation