Update tests and ast with isEmpty method for Mem