The only way to really do that is to use a check now. Seems like you can have null entries in there (which I assume map to null not an empty datetime). This is why I hate it when external libraries seem to think they should be responsible for constructing objects.
You can use a ternary to check them:
PHP Code:
($result['DateEntered'] instanceof DateTime) ? $result['DateEntered']->format('Y-m-d H:i:s') : $result['DateEntered']
And do the same with the date updated. Not sure what it is otherwise, it could technically be an integer or simply null. So I just left it raw.