Linux - check if directory exists

The command below checks if a directory exists and outputs the result to the command line
    
        [ -d /var/www/my_dir ] && echo "Dir exists" || echo "Dir does not exists"