Check if a value exists in a Matrix field
You can check if certain elements match for your Query via exists()

entry.floors.type('floor').floorNumber(1).exists()


returns true or false. However keep in mind entry.floors returns an element of type Query and you'll append the parameters type and floorNumber to the Query. These properties won't reset magically since you call the object by reference and not by value thus you'll either need to reset them

{% do entry.floors.type(null).floorNumber(null) %}


or you don't use the object directly and clone/copy it instead 

{% set exists = clone(entry.floors).type('floor').floorNumber(1).exists() %}