Added a toBool method to MGFramework