How do I check if a given variable is empty?

If we want to check whether a variable has a value or not, it is possible to use the empty() function.