Use strict comparisons where easily possible

Inspired by bbPress https://bbpress.trac.wordpress.org/changeset/4995/