You're actually inside the `Chef` namespace (via `class Chef`), so this could just be `defined?(Sugar)`, but I like the explicitness here