added assertions to check values that may be null for the line 43 bug