sam
01/21/2019, 5:20 AMval person : Person? = ... possibly null person
person whenNotNull {
it.name.shouldHaveLength(12)
it.age should beGreaterThan(21)
}
Which I believe is what you want, but the keyword "whenNotNull" needs to be something a bit catchier.