Fix type check to accept only string