Add safety check if attributes are unset

Since users may still be using the install flavor recipes directly instead of the default recipe, we check `java_home` and conditionally `openjdk_packages` and include `set_attributes_from_version` if these are `nil`.