Could we get rid of the `||` by using a regexp like `/^\s*$/`?