Add nil check for request.env["HTTP USER AGENT"] in ruby browser check. Refs #2076.