def coerceBigInt(x):
<EOL>if isinstance(x, BigInt):<EOL><INDENT>return x<EOL><DEDENT>elif isinstance(x, (long, int)):<EOL><INDENT>return BigInt(x)<EOL><DEDENT>else:<EOL><INDENT>return None<EOL><DEDENT>
Retrieves a BigInt from @x or returns None if @x is not a type that can be
converted.