Revert change done in 11f543f1f2.

The change is unneeded now as Security::encrypt() no longer throws exception
for falsey values.
Merge pull request #2484 from ADmad/2.5-cookiecomponent

Revert change done in 11f543f1f2.