Do not do get of null

If you try 'get(null, "length")' in the console you will see that it returns 3 (!?). If you happen to have 3 elements in the content initially, it fails later on.