Converted the `content.length === 0` check to `!content.trim().length`, and cleaned-up the code to use curly braces on new lines.