You need to post some code here for someone to really help.
However, looking at your error, you are probably doing an implicit cast somewhere (which is wrong).
Try to convert your string to a boolean by writing logic like
if (mystr =="..."
{
return true;
}
else
{
return false;
}