handle NullPointerExceptions in checkout