Same behavior on Ruby:
def content_markup(children) case children when String, Numeric children when NilClass, TrueClass, FalseClass return else # ... end end content_markup 'foo' #=> "foo" content_markup 0 #=> 0 content_markup true #=> nil content_markup false #=> nil content_markup nil #=> nil