Prevent throwing a ReferenceError
Remove duplicate tests