[*] changes to avoid using of null pointers