Check if nextVersion is null

Fixes #13.