Add documentation for toBoolean method