Don't add nil as last request

A command could yield a valid request but also nil so we need to check
that otherwise nil will be added as next request blowing up everything