Merge pull request #672 from jay-hodgson/release-20

fix npe in view
check if content-type has a truthy value