Try to get sum as type Long.
fun sumCarbs() : LiveData<Long>
And add case sensitive search for WHERE clause
@Query ("SELECT SUM(amountFood) FROM user_table WHERE typeFood GLOB '*' || :food || '*'")
fun sumCarbs(food : String) : LiveData<Long>
Make sure you are querying from right table.