Fix null exception on function .contains