Fix the cleanup with boolean values #49 

Added an additional check for boolean values.
Merge pull request #50 from pauloschilling/patch-1

Fix the cleanup method with boolean values