CFI code was not checking for nil pointer