Fixing broken defined() check