fixed npe from testing endpoint url when endpoint may have not been
initialized