Safer check for constant nodes.