Added hasPrefix template function