Fix santize and humanReadable methods

  - Checks if string type now, else returns empty string
  - Replaces all occurences of characters with 'g' flag