@NonNull static fun <T : Any!> requireNonNull(object: T, message: String!): T
Checks if the given object is not null. If the object is not null then it's returned, throw IllegalArgumentException
otherwise with the specified message.
object
- T: will be checked if it is not null
message
- String!: message used for the thrown exception
IllegalArgumentException
- thrown if the object is null
Return
T: the object passed as arguments if it's not null