Fixing error handling

Occasionally Twitter API will fail to return correctly (likely due to
server overload); functions fixed to handle this gracefully to the
'undefined' returns.