``if hdus is not None`` is more idiomatic.