How to check if a command returns nothing

Hi, I want to write a script that runs a command (at -l) and writes the output to a file. If the command (at -l) command returns no value (is empty/null) then write a message to the file in place of the command output.

My problem is around trapping the empty returned command value and replacing with my own message. Checking $? returns success (0) as the command ran but the return from the command is empty.

Appreciate any help, thanks.

Assuming at -l gives no output to stdout -

#!/bin/ksh
at -l > t.lis
if [[ -s t.lis ]] ; then
    echo 'we got a result'
else
    echo 'no result'
fi

Many thanks, that works great!