add category to return nil when JS string is undefined