Strict type check for null cache values

Previously, generated cache results that returned 0, '', array() etc
were being ignored. This change narrows it down to just false.

Ideally we would use a EmptyCacheHit object to be very specific for
these cases, but perhaps this approach is a bit overkill.
Merge pull request #2605 from willmorgan/cachetofile-false-fix

Strict type check for null cache values