Utilities for Javascript plug

For that matter, it would be more idiomatic to say simply `if not type:`. And I'd personally condense it to `type = type or [None]`.