Closure handilng: fix bug in comparison

Made the mistake of using float for what should be
a string comparison in PHP versions