Bugfix: better checking for attribs before we use them

Add return value for when no env is found to not break recipe
code which relies on this.