[Bug] Modified getCheckedState to handle string values correctly

This pull request is to satisfy the issue stated in the Bug report https://github.com/laravel/framework/issues/3944