don't use ast before checking it's not NULL