COALESCE
The COALESCE function evaluates a number of expressions and returns the results for the first expression that does not raise an error.
COALESCE Syntax
Use the following syntax when incorporating the COALESCE function in queries:
COALESCE( expression1, expression2 [,...] )
COALESCE tries the first expression; if it raises an error, it tries the second expression, and so on. Errors occur if an expression evaluates to an unbound variable or a non-RDF-term-type value. If none of the expressions are evaluated without error, the query results in an error.