Fixed safe_tags_replace for other types than string.