added try/catch for missing RB keys
translated errors in getValidInput and getValidSafeHTML