allow for optional, undefined attributes

while you're in here, there's an extra space before the `==`