check that response not null before using.