Get it nearly working and add a null check in the init method