OpenSCAD User Manual/Type Test Functions

is_undef
is_undef accepts one parameter. If the parameter is undef, this function returns true. If the parameter is not undef, it returns false. When checking a variable (like `is_undef(a)`), it does the variable lookup silently, meaning that is_undef(a) does not cause `WARNING: Ignoring unknown variable 'a'. `

The alternative is code like this: or causes WARNING: Ignoring unknown variable 'a'.

is_undef also works for special variables, allowing for things like this:

legacy support
For older openscad version, is_undef can be emulated with which of-course causes warning(s), but requires no changes to code relying on is_undef.

is_function
The  check works only for expressions, so it can be applied to function literals or variables containing functions. It does not work with built-in functions or normal function definitions.