Fixed crash that stops strider if an error happens

If an error occurs "res" will be null, thus we get a null pointer exception. Fixed that by wrapping it in a nullish test.