Added method to convert string to boolean