The same way you would do it with anything in js, typeof foo == 'undefined', or since “locals” is the name of the object containing them, you can do if (locals.foo). It’s just raw js :p
The same way you would do it with anything in js, typeof foo == 'undefined', or since “locals” is the name of the object containing them, you can do if (locals.foo). It’s just raw js :p