Changed type checking func to be locale independent

After I changed locale to Swedish bash-it suddenly stopped working. This patch addresses the issue by eliminating English locale dependency.