Throw a nice exception if the elementClass argument is null for working with keyindices. #404
Updated changelog.