Fixes exception when init is null

#34

When not initializing a var it's `init` property is set to null. Perform the check here so this doesn't throw