throw immediately if it takes non-string value