Explicitly check init node when inferring type of class