null pointer exception

add null pointer exception handling when receive unsucess response