Fixed safe_input() input validation.