Throw an exception for whitespace in keys