Handle undefined and boolean