Can reduce indentation by starting with `if (!template) { return null; }`