class Sass::Tree::Node

def invalid_child?(child)

and false or nil otherwise.
if the given child node is invalid,
This method should be overridden by subclasses to return an error message
def invalid_child?(child)
  false
end