Do you mean to extract that that block into a helper, or just the content.length check? What about the cases where content isn't defined and therefore has no length?