Function with passing a char variable and return of a logical variable