Removing extra variable and using is defined instead