Fixed error if both error and result are null.