bodyOrNull

inline fun <T : Statement> FunctionDeclaration.bodyOrNull(n: Int = 0): T?

This inline function returns the n-th body statement (in AST order) as specified in T or null if it does not exist or the type does not match.

For convenience, n defaults to zero, so that the first statement is always easy to fetch.