Fix #888 - StringIndexOutOfBoundsException opening themes

Fix #888 - features array no longer causes out of bounds exception when empty, also added null handling when loading theme from JSON.